#### Notes for settings.py
# Most default settings will be fine. Here are a few of the trims-specific things
# plus a few others I found helpful

# Using a SITE_ROOT like this makes your app a little more portable
# for debugging and what-have-you. Limits the use of hard-coded absolute paths.
import os
SITE_ROOT = os.path.realpath(os.path.dirname(__file__))
MEDIA_ROOT = os.path.join(SITE_ROOT, 'media')

# Copypasta this section into your settings.py for LDAP/AD authentication
# Remember to change the AD_DNS_NAME to the DNS name of your primary DC
# ./trims/accounts/backend.py must exist.
AD_DNS_NAME='PDC_DNS_NAME'
# If using non-SSL use these
AD_LDAP_PORT=389
AD_LDAP_URL='ldap://%s:%s' % (AD_DNS_NAME,AD_LDAP_PORT)

# If using SSL use these:
#AD_LDAP_PORT=636
#AD_LDAP_URL='ldaps://%s:%s' % (AD_DNS_NAME,AD_LDAP_PORT)

# Common Settings
AD_SEARCH_DN='dc=domain,dc=suffix'
AD_NT4_DOMAIN='domain.suffix'
AD_SEARCH_FIELDS= ['mail','givenName','sn','sAMAccountName','memberOf']
AD_MEMBERSHIP_REQ=[]
#AD_CERT_FILE='/path/to/your/cert.txt'
AUTHENTICATION_BACKENDS = ('trims.accounts.backends.ActiveDirectoryGroupMembershipSSLBackend',
'django.contrib.auth.backends.ModelBackend')
AD_DEBUG=True
AD_DEBUG_FILE='/var/log/trims_ldap.debug'
